<?php

namespace App\Models;

class UserPayOrderModel extends RbhBaseModel
{
    protected $table = 'user_pay_order';

    protected $guarded = [];

    /**
     * 创建支付订单
     * @param $uid
     * @param $orderNo
     * @param $money
     * @param $type
     * @return mixed
     */
    public static function createPayOrder($uid, $orderNo, $money, $type): mixed
    {
        return self::create([
            'uid'       => $uid,
            'money'     => round($money, 2),
            'order_no'  => $orderNo,
            'type'      => 3
        ]);
    }
}
